<template>
  <div id="app">
    <span v-text="data"></span>
    <el-container class="history">
      <el-header>会员专享</el-header>
 <template>
      <div class="inputserch">


        <el-input class="el-in" placeholder="请输入视频url" v-model="query">
          <el-button slot="append" icon="el-icon-search" @click="getInfo"></el-button>
        </el-input>

      </div>
    </template>
    </el-container>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data: '',
        query:''
      }
    },
    methods: {
      getInfo(){
        self.location.href=`https://www.pangujiexi.cc/jiexi.php?url=${this.query}`;
      },
      async Info() {
        if (localStorage.getItem("accessToken") == null) {
          alert('请先登录')
          this.$router.push('/login')
        }
        // const ifo=await this.$http.get("nono/vipview/hello")
        // console.log(ifo)
        const ifo = await this.$http.get("nono/vipview/logs", {
          headers: {
            "Authorization": "Bearer " +
              localStorage.getItem("accessToken")
          }
        })
        console.log(ifo)
        this.$http.get("/nono/vipview/logs", {
          headers: {
            "Authorization": "Bearer " +
              localStorage.getItem("accessToken")
          }
        })
        if (ifo.data.states == 403) {
          this.$message.error("请先开通会员")
          this.$router.push('/alipay')
        }



      }
    },
    mounted() {
      this.Info()
    }
  }
</script>

<style>
</style>
